<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/logo.svg" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Vite + Vue + TS</title>
    <style>
      #app-loading {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        background: white;
        z-index: 9999;
      }
      .loading-spinner {
        width: 50px;
        height: 50px;
        border: 5px solid #f3f3f3;
        border-top: 5px solid #3498db;
        border-radius: 50%;
        animation: spin 1s linear infinite;
      }
      @keyframes spin {
        0% {
          transform: rotate(0deg);
        }
        100% {
          transform: rotate(360deg);
        }
      }
    </style>
  </head>
  <body>
    <!-- 加载动画（会在应用初始化后被替换） -->
    <div id="app-loading">
      <div class="loading-spinner"></div>
    </div>
    <div id="app"></div>
    <div id="target-container"></div>
    <!-- Teleport的目标位置 -->
    <script type="module" src="/src/main.ts"></script>
    <script>
      // 应用加载完成后移除动画
      window.addEventListener("DOMContentLoaded", () => {
        const loading = document.getElementById("app-loading");
        if (loading) loading.style.display = "none";
      });
    </script>
  </body>
</html>
